import instance from "./request";

//获取验证码
export const captcha = function(){
    return instance.get('/captcha')
}

//登录
export const login = function (data) {
    return instance.post('/login', data)
}

//查询冉冉商品
export const selectrrgoods = function () {
    return instance.get('/selectrrgoods')
}

//根据页码查询
export const srrgoodsforpage = function(data){
    return instance.post('/srrgoodsforpage',data)
}

//新建商品
export const addrrgoods = function(data){
    return instance.post('/addrrgoods',data)
}

//查询全部销量
export const searchsalescount = function(){
    return instance.get('/searchsalescount')
}

//查询各商品的销量
export const searchgoodssales = function(){
    return instance.get('/searchgoodssales')
}

//购买商品
export const buygoods = function(data){
    return instance.post('/buygoods',data)
}

//编辑商品
export const updategoods = function(data){
    return instance.post('/updategoods',data)
}

//删除商品
export const deleterrgoods = function(data){
    return instance.post('/deleterrgoods',data)
}

//删除多条商品信息
export const deleteMorerrgoods = function(data){
    return instance.post('/deleteMorerrgoods',data)
}

